function act_summary_multTime(ExpGroup,pl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   summary of population activity displayed as imagesc
%   For 1 layer exp use only the first 2 arguments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
adata_dir = '\\argon.fmi.ch\keller.g\AData\';
set(0,'defaultaxesposition',[0 0 1 1])
for ind=1:length(ExpGroup)
    fig_pos=[2890+(330*(ind-1))        -166         319         980];
    [adata_file,mouse_id,userID]=find_adata_file(ExpGroup(ind),adata_dir);
    orig=load([adata_dir userID '\' mouse_id '\' adata_file],'ROIs');
    display(['Exp: ' num2str(ExpGroup(ind))]);
    act_mat=[];
    max_act_mat=[];
    if nargin>1
        for gnd=1:length(orig.ROIs{pl})
            act=ftfil(orig.ROIs{pl}(gnd).activity,18,0,10);
            act=psmooth(act);
            raw_act=act/median(act);
            max_act=max(raw_act);
            act_mat(gnd,:)=raw_act;
            max_act_mat(gnd)=max_act;
        end
    else
        for gnd=1:length(orig.ROIs)
            act=ftfil(orig.ROIs(gnd).activity,18,0,10);
            act=psmooth(act);
            raw_act=act/median(act);
            max_act=max(raw_act);
            act_mat(gnd,:)=raw_act;
            max_act_mat(gnd)=max_act;
        end
    end
    max_act=max(max_act_mat);
    
    figure;
    set(gcf,'position',fig_pos);
    xlim([0 size(act_mat,2)])
    ylim([0 size(act_mat,1)+1])
    imagesc(act_mat)
    if ind==1 | ind==4
        for znd=1:size(act_mat,1)
            hold on
            text(50,znd,num2str(znd),'fontsize',7,'color','w')
        end
    end
    axis off
    box off
    drawnow
end

